package com.woniuxy.service;

import com.woniuxy.model.entity.TransactionOrder;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
* @author Administrator
* @description 针对表【transaction_order】的数据库操作Service
* @createDate 2025-01-06 10:10:10
*/
public interface
TransactionOrderService {


    boolean payOrder(String orderNo, Long paymentMethodId);

    /**
     * 根据订单号获取交易订单
     */
    TransactionOrder getTransactionByOrderNo(String orderNo);

    /**
     * 创建交易订单
     */
    void createTransactionOrder(TransactionOrder transactionOrder);

    /**
     * 更新交易订单状态
     */
    void updateTransactionStatus(String orderNo, Integer status, Integer paymentStatus);

    TransactionOrder getOrderByOrderNo(String orderNo);

    void updateOrder(TransactionOrder order);

    List<Map<String, Object>> getPendingPaymentOrders(Long customerId);

    List<Map<String, Object>> getCompletedOrders(Long customerId);

    Map<String, Object> getOrderDetails(String orderNumber);

    boolean refundOrder(String orderNumber);
}
